package com.senthink.gl.business.domain.repository;

import com.senthink.gl.business.domain.entity.UserMenuAuthority;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.transaction.annotation.Transactional;

/**
 * 用户菜单权限Repository
 *
 * @author zooqi@senthink.com
 * @date 2018/03/05
 */
public interface UserMenuAuthorityRepository extends JpaRepository<UserMenuAuthority, Long> {

    /**
     * 通过uid批量删除
     *
     * @param uid
     * @return
     */
    @Modifying
    @Transactional
    int deleteAllByUserUid(String uid);
}
